package cn.ctyun.xstore

import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.widget.TextView
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.google.android.material.snackbar.Snackbar
import androidx.appcompat.app.AppCompatActivity

class LoadObjectNamesActivity : AppCompatActivity() {

    lateinit var loadObjectResText: TextView

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_load_object_names)
        setSupportActionBar(findViewById(R.id.toolbar))
        loadObjectResText = findViewById(R.id.load_object_res)
        Thread {
            val objectNames = loadObjectNames(100)
            var txt = ""
            for (name in objectNames)
                txt += name + '\n'

            Handler(Looper.getMainLooper()).post {
                loadObjectResText.text = txt
            }
        }.start()
    }
}